﻿package com.wandian.controller
{
	import com.wandian.data.GameData;
	import com.wandian.model.UserInfoProxy;
	import com.wandian.view.mediator.HelpMediator;

	import flash.display.MovieClip;

	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * 游戏帮助
	 * @author long
	 */
	public class HelpCommand extends SimpleCommand
	{
		private var _global:GameData;

		public function HelpCommand()
		{
			this._global=GameData.getInstance();
			return;
		} 

		override public function execute(notification:INotification):void
		{
			var _loc_2:UserInfoProxy=null;
			super.execute(notification);
			switch (notification.getName())
			{
				case CLZNoticeName.HELPCOMMAND_SHOW_HELP:
				{
					facade.registerMediator(new HelpMediator(int(notification.getBody())));
					break;
				}
				case CLZNoticeName.SHOW_HELP:
				{
					facade.registerMediator(new HelpMediator(int(notification.getBody())));
					break;
				}
				case CLZNoticeName.COMPLETE_NEW_HELP_REQ:
				{
					_loc_2=facade.retrieveProxy(UserInfoProxy.NAME) as UserInfoProxy;
					_loc_2.requestCompleteNewHelp();
					break;
				}
				default:
				{
					break;
				}
			}
			return;
		} 

	}
}
